import {createRouter, createWebHashHistory} from 'vue-router'
import userRouter from './modules/user'
import Layout from '../pages/Layout/index'
import login from '../pages/user/login/index'
import displayRouter from "@/router/modules/display";

const routes = [
	// {
	// 	path: '',
	// 	redirect: '/',
	// },
	{
		path: '/',
		component: login,
		redirect: '/user/login'
	},
	userRouter,
	displayRouter
]

//vue3的用法
const router = createRouter({
	history: createWebHashHistory(),
	routes: routes,
	scrollBehavior: () => ({top: 0})
})

export default router
